package com.imooc.course.file.controller.admin;

import com.imooc.course.server.dto.PageDto;
import com.imooc.course.server.dto.ResponseDto;
import com.imooc.course.server.service.FileService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("/admin/file")
public class FileController {

    private static final Logger log = LoggerFactory.getLogger(FileController.class);
    public static final String BUSINESS_NAME = "文件";


    @Resource
    private FileService fileService;

    /**
     * 查询列表
     * @param pageDto 传入的page和size
     * @return
     */
    @PostMapping("/list")
    public ResponseDto getList(@RequestBody PageDto pageDto) {
        fileService.getList(pageDto);
        return ResponseDto.success().setContent(pageDto);
    }

}
